package com.jt;

import com.jt.pojo.Person;
import com.jt.pojo.User;
import org.junit.Test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.applet.AppletContext;

/**
 * @outhor fufeixiang
 * @date 2021-04-22
 */
public class testSpring {
    @Test
    public void testDI(){
        ApplicationContext context = new ClassPathXmlApplicationContext("application.xml");
        User user = context.getBean(User.class);
        Person person = context.getBean(Person.class);
        System.out.println(user.toString());
        System.out.println(person);
//        System.out.println(user);
    }
}
